package com.hmall.controller;

import com.hdmall.business.common.common.ServerResponse;
import com.hmall.service.MsgService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author zhoutao
 * PC消息推送
 */
@RestController
@RequestMapping("msg/")
@CrossOrigin(origins = "http://localhost:8088", maxAge = 3600)
@Api(value = "PC消息推送API", description = "PC消息推送API说明-v2")
public class MsgPushPcController {
    @Autowired
    private MsgService msgService;

    /**
     * @Date 2018/11/9 14:41
     * @Param [messageId, userName, type, body, title, value]
     * @return com.hmall.common.ServerResponse
     * @Description // 队列消息推送
     */
    @PostMapping("backDirectPush")
    @ApiOperation(value = "队列PC消息推送")
    public ServerResponse backDirectPush(Integer messageId, String userName, String type, String body, String title, String value){

       return msgService.backDirectPush(messageId,userName,type,body,title,value);
    }

}
